package com.xinqi.modules.chat.enums.group;

import com.fasterxml.jackson.annotation.JsonCreator;
import com.fasterxml.jackson.annotation.JsonValue;
import com.xinqi.common.base.enums.BaseEnum;
import lombok.Getter;

/**
 * 融云群组通知Operation
 *
 * @Author：yyzhen
 * @Package：com.xinqi.modules.chat.enums.group
 * @Project：xinqi.modules-Cloud-Plus
 * @name：GroupNoticeOperationEnum
 * @Date：2023/6/29 10:58
 * @Filename：GroupNoticeOperationEnum
 */
public enum GroupNoticeOperationEnum implements BaseEnum {

    /**
     * 融云自带群组通知Operation
     */
    CREATE_OPERATION("Create", "创建群组"),

    RENAME_OPERATION("Rename", "修改群名称"),

    ADD_OPERATION("Add", "添加群成员"),

    KICKED_OPERATION("Kicked", "移出群成员"),

    REMOVE_MANAGE("removeManage", "融云--移除群管理"),

    ADD_MANAGE("addManage", "融云--添加群管理"),

    SHIFT_LEADER("shiftLeader", "融云--转让群主"),

    QUIT_OPERATION("Quit", "退出群组"),

    DISMISS_OPERATION("Dismiss", "解散群组"),

    /**
     * 自定义群组通知Operation
     */
    PROHIBITION_OPERATION("Prohibition", "群组禁言"),

    CANCEL_PROHIBITION_OPERATION("CancelProhibition", "解除群组禁言"),

    TOP_OPERATION("Top", "消息置顶"),

    CANCEL_TOP_OPERATION("CancelTop", "取消消息置顶"),

    NOTICE_OPERATION("Notice", "群公告"),

    CANCEL_NOTICE_OPERATION("CancelNotice", "取消群公告");

    @Getter(onMethod_ = {@JsonValue})
    private final String code;

    @Getter
    private final String describe;

    GroupNoticeOperationEnum(String code, String describe) {
        this.code = code;
        this.describe = describe;
    }

    @JsonCreator
    public static GroupNoticeOperationEnum of(String code) {
        return BaseEnum.of(GroupNoticeOperationEnum.class, code);
    }
}
